<?php

/**
 * NOTICE OF LICENSE
 *
 * THIS SOURCE FILE IS PART OF EVEBIT'S PRIVATE PROJECT.
 * 
 * DO NOT USE THIS FILE IN OTHER PLACE.
 *
 * @package   App_Backend
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: Abstract.php 20 2010-12-18 09:35:07Z cheng.wei $$
 * @copyright Copyright (c) 2008 Evebit Inc. China (http://www.evebit.com)
 */

/**
 * Options for config entry
 * 
 * @package   App_Backend
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: Abstract.php 20 2010-12-18 09:35:07Z cheng.wei $$
 */
abstract class Default_Model_Config_Source_Abstract {
	
	/**
	 * Get options
	 * @return array
	 */
	public function getOptionsArray() {
		return array();
	}
	
	/**
	 * Get value of a option
	 * 
	 * @param string $value
	 * @return string
	 */
	public function getValue($value) {
		$options = $this->getOptionsArray();
		if (isset($options[$value])) {
			return $options[$value];
		} else {
			return null;
		}
	}
}